## REPLICATION ARCHIVE: 

Katsumata, Hiroto. 2024. "How Should We Estimate Inverse Probability Weights with Possibly Misspecified Propensity Score Models?" Political Science Research and Methods, forthcoming.


# CONTENTS

- This replication archive contains the following folders and files needed to replicate the results in the article:


(1) README.txt: this document.


(2) Dataset

- All datasets are included in "data" folder.
- See "HOW TO REPRODUCE THE RESULTS" section for details.

1. "data/IPW_review.csv": Literature review of the weighting and matching methodology in political science
2. "data/FM_France.dta": Replication dataset for Ferwerda and Miller (2014)
3. "data/LaddLenz.dta": Replication dataset for Ladd and Lenz (2009)


(3) Code

- All codes are included in "scripts" folder except for "functions/dbw_simulation_functions.R", which is included in "functions" folder

1. "scripts/coding.R"
2. "scripts/numerical_example.R"
3. "scripts/dbw_sim_script.R"
4. "scripts/dbw_emp_script.R"


Each of the four scripts produces the following figures, tables, and values mentioned in the main text

1. "scripts/coding.R"

## Figures
- Figure A.1 (Online Supplementary Materials A)


2. "scripts/numerical_example.R"

## Figures
- Figure 2 (left panel)
- Figure 2 (right panel)
- Figure 3
- Figure B.1 (Online Supplementary Materials B)
- Figure C.1 (Online Supplementary Materials C)

## Values mentinoed in the main text
- Values mentioned in Section 2 (a-1 and b-1)
- Values mentioned in Section 2.1
- Values mentioned in Section 4.1


3. "scripts/dbw_sim_script.R"

## Figures
- Figure 4 (left panel)
- Figure 4 (right panel)

## Tables
- Table 2
- Table 3
- Table 4
- Table I.1 (Online Supplementary Materials I)
- Table I.2 (Online Supplementary Materials I)
- Table I.3 (Online Supplementary Materials I)
- Table I.4 (Online Supplementary Materials I)
- Table I.5 (Online Supplementary Materials I)
- Table I.6 (Online Supplementary Materials I)

## Values mentinoed in the main text
- Values mentioned in Section 5


4. "scripts/dbw_emp_script.R"

## Figures
- Figure 5
- Figure 6 (left panel)
- Figure 6 (right panel)
- Figure 7
- Figure H.1 (Online Supplementary Materials H)

## Tables
- Table G.1 (Online Supplementary Materials G)
- Table G.2 (Online Supplementary Materials G)


(4) Log files
All log files are included in "log" folder.
  - "log/coding_log.txt" (empty)
  - "log/numerical_example_log.txt"
  - "log/dbw_sim_script_log.txt"
  - "log/dbw_emp_script_log.txt"


# HOW TO REPRODUCE THE RESULTS

- Open an R project "replication_dbw.Rproj".
- Run the following codes in the R project.
	- "scripts/coding.R"
	- "scripts/numerical_example.R"
	- "scripts/dbw_sim_script.R"
	- "scripts/dbw_emp_script.R"
- All figures are saved in "figures" folder.
- All tables are saved in "tables" folder in a LaTeX format.



# NOTES ON COMPUTING

- The maximum number of cores used: 6.
- The maximum amount of RAM on the computer that executed the replication files: 4GB.



# NOTES ON THE FIGURES and TABLES

- Figure 1 and Table 1 are not produced either through statistical nor simulation analysis. Thus, they are not reproduced by the codes above.



# SOFTWARE DEPENDENCIES

- All analyses were produced with the following software, operating system environments, and installed packages:

- Operating system: macOS Ventura 13.2.1
- R version 4.0.2
- R packages
	- dbw (version 1.1.2)
	- dplyr (version 1.0.2)
	- foreign (version 0.8-80)
	- furrr (version 0.2.3)
	- future (version 1.22.1)
	- ggplot2 (version 3.4.2)
	- glmnet (version 4.0-2)
	- Hmisc (version 4.4-1)
	- kbal (version 0.1)
	- kernlab (version 0.9-29)
	- purrr (version 0.3.4)
	- RCAL (version 2.0)
	- tidyverse (version 1.3.0)
	- trust (0.1-8)
